#!/usr/bin/groovy
@Library('test-shared-library') _

properties(
        [
                buildDiscarder(logRotator(numToKeepStr: '10'))
        ]
)

node("docker") {
    cleanWs()
    checkout scm
    def commons = load 'jenkins/benchmarksCommons.groovy'
    commons.withDocker {
        withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: 'jenkins-full-aws-creds', accessKeyVariable: 'AWS_ACCESS_KEY_ID', secretKeyVariable: 'AWS_SECRET_ACCESS_KEY']]) {
            sh "./gradlew :sparkling-water-benchmarks:runBigDataH2OtoSparkConversionBenchmarks -Paws_access_key=${AWS_ACCESS_KEY_ID} -Paws_secret_key=${AWS_SECRET_ACCESS_KEY} -Paws_ssh_public_key=default"
        }
        arch '**/output/*'
    }
}
